var api     = require('../../utils/api.js');
var WxParse = require('../../wxParse/wxParse.js');
var app     = getApp();

Page({

    /**
     * 页面的初始数据
     */
    data: {
        info:[]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

        var that=this;
        
        if(options.id){
            api.get({
                url: 'index/getServicebyid',
                data: {id:options.id},
                success: data => {
                    that.setData({
                        info:data.data
                    })
    
                    WxParse.wxParse('articleContent', 'html', data.data.content, this, 30);
                }
            });
        }else{
            api.get({
                url: 'index/getServicebyid',
                data: {sid:options.sid},
                success: data => {
                    that.setData({
                        info:data.data
                    })
    
                    WxParse.wxParse('articleContent', 'html', data.data.content, this, 30);
                }
            });
        }

     


     
    },

})